package com.example.mapper;

import com.example.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper {
    User findByPhone(@Param("phone") String phone);
    
    User findByEmail(@Param("email") String email);
    
    User findById(@Param("id") Long id);
    
    int insert(User user);
    
    int update(User user);
    
    int deleteByPhone(@Param("phone") String phone);
    
    int updatePassword(@Param("phone") String phone, @Param("hashedPassword") String hashedPassword);
    
    int verifyPhone(@Param("phone") String phone);
    
    int verifyEmail(@Param("email") String email);
    
    int checkPhoneExists(@Param("phone") String phone);
    
    int deactivateUser(@Param("id") Long id);
} 